type Repeat<
  T extends string | number,
  N extends number,
  A extends any[] = []
> = A["length"] extends N ? A : Repeat<T,N,[...A,T]>;
type A = Repeat<string, 3>; //[string,string,string]
type A1 = Repeat<1, 1>; //[string,string,string]
type A2 = Repeat<1, 0>; //[string,string,string]

export {};
